package org.vehicle.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.vehicle.dao.ManagerInfoMapper;
import org.vehicle.entity.ManagerInfo;
import org.vehicle.service.ManagerInfoService;
import org.vehicle.service.base.BaseServiceImpl;
@Service
public class ManagerInfoServiceImpl extends BaseServiceImpl<ManagerInfo, Long> implements ManagerInfoService{
	@Autowired
	private ManagerInfoMapper managerInfoMapper;
	
	@Override
	public ManagerInfo findManagerInfoByLoginName(String LoginName) {
		
		return managerInfoMapper.findManagerInfoByLoginName(LoginName);
	}

	@Override
	public Map<String, Object> getManagerInfoPage(Map<String, Object> paramMap) {
		List<Map> managerInfoList = managerInfoMapper.getManagerInfoList(paramMap);
    	Integer count = managerInfoMapper.getManagerInfoCount(paramMap);
    	//分页数据
    	Map<String, Object> dataMap = new HashMap<String, Object>();
    	dataMap.put("totalCount", count);
    	dataMap.put("list", managerInfoList);
    	dataMap.put("currentPage", paramMap.get("currentPage"));
		return dataMap;
	}

	@Override
	public List<ManagerInfo> getManagerInfoListByCondition(ManagerInfo managerinfo) {
		return managerInfoMapper.getManagerInfoListByCondition(managerinfo);
	}

	@Override
	public ManagerInfo getManagerInfoByLoginName(Map<String, Object> paramMap) {
		// TODO Auto-generated method stub
		return managerInfoMapper.getManagerInfoByLoginName(paramMap);
	}

	@Override
	public ManagerInfo getManagerInfoByCertificateCode(Map<String, Object> paramMap) {
		// TODO Auto-generated method stub
		return managerInfoMapper.getManagerInfoByCertificateCode(paramMap);
	}

}